<template>
  <div class="layout">
    <div class="top-container">
      <div class="title-row">
        <img src="@/assets/logo.png" alt="" />
        <div class="title">
          <span>{{ systemName }}</span>
        </div>
      </div>
      <div class="info-row">
        <div class="left">
          <div style="text-decoration: underline">前往使用说明文档>></div>
        </div>

        <div class="right">
          <span class="plugin">
            <img src="@/assets/images/icon-plugin.png" alt="" />依赖项</span>
          <span class="text">vite4.1.2、vue3.2.1、pinia、axios、vant4.8.7、vue-router、mockjs、sass、loadash、moment</span>
        </div>
      </div>
      <div class="qrcode">
        <span class="text">微信公众号</span>
        <qrcode-vue :value="qrcodeValue" :size="75" :margin="2"></qrcode-vue>
      </div>
    </div>
    <GridView></GridView>
  </div>
</template>

<script setup lang="ts">
import QrcodeVue from "qrcode.vue";
import { systemName } from "@/settings";
const qrcodeValue = "测试";
</script>
<style lang="scss" scoped>
.layout {
  max-width: 414px;
  font-size: 12px;
  height: auto;
  min-height: 100%;
  margin: 0 auto;
  color: #333;
  background-color: #f6f6f6;
  position: relative;
  background-size: 300px 302px;

  .top-container {
    height: 240px;
    position: relative;
    background-color: $base-primary-color;
    background-size: 100% 100%;

    .title-row {
      width: 100%;
      display: flex;
      align-items: center;
      background-color: $base-primary-color-dark;

      img {
        padding: 10px;
        width: auto;
        height: 30px;
      }

      .title {
        color: #ffffff;
        font-weight: 400;
        line-height: 28px;
        font-size: 20px;
      }
    }

    .info-row {
      display: flex;
      justify-content: space-between;
      align-items: start;
      position: relative;
      padding: 15px 16px 0 10px;

      .left {
        display: flex;
        align-items: center;
        color: #ffffff;
        font-size: 12px;
        letter-spacing: 0.5px;

        img {
          width: 24px;
          vertical-align: middle;
          margin-right: 5px;
        }
      }

      .right {
        width: 180px;
        display: flex;
        flex-direction: column;
        align-items: end;
        text-align: right;
        color: #ffffff;

        .plugin {
          font-size: 20px;
          letter-spacing: 1px;

          img {
            margin-top: -10px;
            width: 30px;
            vertical-align: middle;
            margin-right: 5px;
          }
        }

        .text {
          font-size: 12px;

          margin: 2px 0 10px;
          line-height: 18px;
          font-weight: 400;
          letter-spacing: 1px;
        }
      }
    }

    .qrcode {
      position: absolute;
      bottom: 15px;
      left: 5px;
      width: 80px;
      text-align: center;
      color: #fff;
      letter-spacing: 1.5px;
      font-size: 12px;

      .text {
        opacity: 0.6;
        height: 22px;
        line-height: 22px;
      }

      canvas {
        margin-bottom: -3px;
      }
    }
  }
}

::v-deep(.grid) {
  min-height: calc(100vh - 6.4rem);
  height: auto;
}
</style>
